<form action="index.php" method="post" name="adminForm">
  <table class="adminlist">
    <thead>
      <tr>
        <th width="20">
          <input type="checkbox" name="toggle" value="" onclick="checkAll(<?= count($this->pics); ?>);" />
        </th>
        <th width="10%"><?= JHTML::_( 'grid.sort', 'Image', 'id', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th class="title"><?= JHTML::_( 'grid.sort', 'Description', 'description', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="15%"><?= JText::_('url') ?></th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'Type', 'pic_type', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="7%"><?= JHTML::_( 'grid.sort', 'Id', 'pic_id', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%">Published</th>
      </tr>
    </thead>  
    <tbody>
    <?  jimport('joomla.filter.output');
      $n = count($this->pics);
      for($i=0; $i< $n; $i++){ 
        
        $pic = &$this->pics[$i];
        $url = PBNYHelper::getFlickrImageUrl($pic->flickr_id, 'thumbnail');
        $checked = JHTML::_('grid.id', $i, $pic->id);
        $published = JHTML::_('grid.published', $pic, $i);
        $link = 'index.php?option=' . $option . '&task=edit&c=pic&cid[]='. $pic->id;
    ?>
        <tr>
          <td><?= $checked ?></td>
          <td><a href="<?= $link ?>"><img src="<?= $url ?>" alt="<?= $url ?>"/></a></td>
          <td><?= $pic->description ?></td>
          <td><?= $url ?></td>
          <td><?= $pic->pic_type ?></td>
          <td><?= "$pic->pic_id ($pic->instance)" ?></td>
          <td><?= $published ?></td>
        </tr>
    <?  } ?>
    <tr>
      <td colspan="7"><?= $this->pagination->getListFooter(); ?></td>
    </tr>
    </tbody>
  </table>
  <input type="hidden" name="option" value="<?= JRequest::getVar( 'option' );?>"/>
  <input type="hidden" name="c" value="<?= JRequest::getVar('c', 'season'); ?>" />
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>      
  <input type="hidden" name="filter_order" value="<?= $this->lists['order']; ?>" />
  <input type="hidden" name="filter_order_Dir" value="<?= $this->lists['order_Dir']; ?>" />
</form>
